package main;
//动物
public class animal {
    private int leg;//腿的数量
    public void eat(){System.out.println("吃东西");}
    public void walk(){}
    public void sleep(){System.out.println("睡觉");}
    public void say(){}
    public void setLeg(int a){
        this.leg=a;
    }
    public int getLeg(){
        return leg;
    }
}
